package ${entity.packageName}.interfaces;

import com.gonsin.base.GPageRequest;
import com.gonsin.base.GPageResult;
import ${entity.packageName}.bean.*;
import ${entity.packageName}.enums.${entity.entityName}Status;
import ${entity.packageName}.po.${entity.entityName}Po;
import ${entity.packageName}.po.${entity.entityName}SearchPo;

import java.util.List;

/**
 * ${entity.entityLabel}相关处理逻辑
 */
public interface I${entity.entityName}Service  {

    /**
     * 查询${entity.entityLabel}
     */
    GPageResult<${entity.entityName}Bean> search${entity.entityName}(${entity.entityName}SearchPo searchPo, GPageRequest pageRequest);

    /**
     * 批量查询${entity.entityLabel}
     */
    List<${entity.entityName}Bean> batchGet${entity.entityName}(List<String> ${entity.entityNameFirstLower}Keys);

    /**
     * 查询一个${entity.entityLabel}
     */
    ${entity.entityName}Bean get${entity.entityName}(String ${entity.entityNameFirstLower}Key);

    /**
     * 删除一个${entity.entityLabel}
     */
    void delete${entity.entityName}(String ${entity.entityNameFirstLower}Key);

    /**
     * 批量删除${entity.entityLabel}信息
     *
     * @param searchPo   搜索条件
     * @return 结果
     */
    int batchDelete${entity.entityName}(${entity.entityName}SearchPo searchPo);

    /**
     * 添加一个${entity.entityLabel}
     *
     * @return
     */
    ${entity.entityName}Bean add${entity.entityName}(${entity.entityName}Po ${entity.entityNameFirstLower}Po);

    /**
     * 修改一个${entity.entityLabel}
     *
     * @return
     */
    ${entity.entityName}Bean update${entity.entityName}(String ${entity.entityNameFirstLower}Key, ${entity.entityName}Po ${entity.entityNameFirstLower}Po);
}
